package com.fqgj.xjd.user.client;

import com.fqgj.common.api.Response;
import com.fqgj.xjd.user.client.request.PanAuthResult;
import com.fqgj.xjd.user.client.request.UserPanCardPageQueryRO;
import com.fqgj.xjd.user.client.request.UserPanSaveInfo;
import com.fqgj.xjd.user.client.response.Pan;
import com.fqgj.xjd.user.client.response.UserPanInfo;

import java.util.List;

/**
 * 用户PanCard信息服务
 *
 * @author liuming
 * Created on 下午3:53 2018/8/17.
 */
public interface UserPanService {

    /**
     * 获取用户PanCard信息
     *
     * @param userCode
     * @return
     */
    Response<UserPanInfo> getByUserCode(String userCode);

    /**
     * 获取ocr扫描pan信息
     */
    Response<Pan> getOcrInfoByUserCode(String userCode);

    /**
     * 根据CardNo获取用户PanCard信息
     */
    Response<UserPanInfo> getByPanNo(String panCard);

    /**
     * 根据pancard获取PanCard列表信息
     * @param panCard
     * @return
     */
    Response<List<UserPanInfo>> getListByPanNo(String panCard);

    /**
     * 根据md5PanCard获取PanCard列表信息
     * @param md5PanCard
     * @return
     */
    Response<List<UserPanInfo>> getListByMD5PanNo(String md5PanCard);

    /**
     * 移除ocr扫描pan信息
     */
    Response removePanOcrInfo(String userCode);

    /**
     * 保存用户信息
     *
     * @param userPanSaveInfo
     * @return
     */
    Response addUserPan(UserPanSaveInfo userPanSaveInfo);

    /**
     * 更新pan的状态和url
     *
     * @param userPanSaveInfo
     * @return
     */
    Response updatePanStatusAndUrl(UserPanSaveInfo userPanSaveInfo);

    /**
     * 关于pan card校验
     * user_kyc_pan_auth_result
     */
    Response addPanAuthResult(PanAuthResult panAuthResult);

    /**
     * 通过user code查询 pan card 校验结果
     * user_kyc_pan_auth_result
     */
    Response<PanAuthResult> getPanAuthResultByUserCode(String userCode);

    /**
     * 通过user code删除 pan card 校验结果
     * user_kyc_pan_auth_result
     */
    Response removePanAuthResult(String userCode);

    /**
     * 分页查询pancard
     * @param userPanCardPageQueryRO
     * @return
     */
    Response<List<UserPanInfo>> getListByPage(UserPanCardPageQueryRO userPanCardPageQueryRO);
}
